/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
/*
 * Created on 03.12.2005
 * 
 * ChangePlayerTypeInfo bekommt vom OtherParser
 * Playernummer und Playertype   
 * 
 */

package robocup.component.infotypes;

import robocup.parser9.Token;

/**
 * This Information is received, if the own coach assigns a heterogeneous 
 * player-type to an agent.
 */
public class ChangePlayerTypeInfo extends Info {

	/**
	 * The number of the player, which has a new player-type.
	 */
	protected int playerNumber;

	/**
	 * The id of the new player-type [0,6]
	 */
	protected int playerType;

	/**
	 * @return Returns the number of the player, who has a new 
	 * player-type.
	 */
	public int getPlayerNumber() {
		return this.playerNumber;
	}

	/**
	 * @return Returns the id of the player-type, which was assigned
	 * to the player.
	 */
	public int getPlayerType() {
		return this.playerType;
	}

	/**
	 * Constructs an info-object holding the new playertype of a given player
	 * 
	 * @param playerNumber -
	 *            the agents unum
	 * @param playerType -
	 *            the agents new playerType
	 */
	public ChangePlayerTypeInfo(Token playerNumber, Token playerType) {
		super(-1);
		this.playerNumber = Integer.parseInt(playerNumber.toString());
		this.playerType = Integer.parseInt(playerType.toString());
		this.infoType = TYPE_PLAYERTYPE;
	}
}
